package cn.demoncat.util.lang.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 * 描述：{字符串类型id,name}键值对类型的实体类
 *
 * @author yxl
 *
 * @version 2.0
 *
 * @since 2016-12-9
 */
public class SidName implements Serializable {

	private static final long serialVersionUID = 1L;

	private String id;
	private String name;

	public SidName() {
		super();
	}

	public SidName(String id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "IdName [id=" + id + ", name=" + name + "]";
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		SidName sidName = (SidName) o;
		return Objects.equals(id, sidName.id) &&
				Objects.equals(name, sidName.name);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, name);
	}
}
